//写一个函数能够把 b指向的字符串 赋值给 a数组, 返回值是一个指针
// strcpy( a , b )


#include<stdio.h>

int MyStrlen(char* a)
{
    int count = 0;
    
    while(*a != '\0')
    {
        count++;
        a++;
    }
    return count;

}
void MyStrcpy(char *a ,  char *b )
{
    while( *b != '\0' )
    {
        *a++ = *b++;
        
        *a = '\0'; 
    }
    
}

int main()
{
    char s1[] = "a";
    const char s2[] = "helloworld";
    
    MyStrcpy(s1,s2);
    
    printf("复制完的s1结果是 %s \n",s1);
    printf("复制完的s2结果是 %s \n",s2);
    return 0;
}





